/*
* Copyright (c) 2020 - 2025 Renesas Electronics Corporation and/or its affiliates
*
* SPDX-License-Identifier: BSD-3-Clause
*/

/***********************************************************************************************************************
 * Includes
 **********************************************************************************************************************/
#include "r_rsip_primitive.h"
#include "r_rsip_reg.h"
#include "r_rsip_util.h"

/***********************************************************************************************************************
 * Functions
 **********************************************************************************************************************/

void r_rsip_func403 (void)
{
    WR1_PROG(REG_1014H, 0x00000660U);
    WR1_PROG(REG_1018H, 0x000006b0U);
    WR1_PROG(REG_101CH, 0x00000070U);
    WR1_PROG(REG_1020H, 0x00000ac0U);
    WR1_PROG(REG_1010H, 0x00000008U);

    WR1_PROG(REG_1004H, 0x04040005U);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);

    WR1_PROG(REG_1014H, 0x00000ac0U);
    WR1_PROG(REG_1018H, 0x00000b10U);
    WR1_PROG(REG_1020H, 0x000002a0U);

    WR1_PROG(REG_1004H, 0x0404000aU);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);

    WR1_PROG(REG_1014H, 0x000002a0U);
    WR1_PROG(REG_1018H, 0x00000ac0U);
    WR1_PROG(REG_101CH, 0x00000070U);
    WR1_PROG(REG_1020H, 0x00000250U);
    WR1_PROG(REG_1010H, 0x00000008U);

    WR1_PROG(REG_1004H, 0x04040002U);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);

    WR1_PROG(REG_1014H, 0x00000660U);
    WR1_PROG(REG_1018H, 0x00000b10U);
    WR1_PROG(REG_1020H, 0x00000ac0U);

    WR1_PROG(REG_1004H, 0x0404000aU);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);
    WR1_PROG(REG_1014H, 0x00000660U);
    WR1_PROG(REG_1018H, 0x00000ac0U);
    WR1_PROG(REG_101CH, 0x00000070U);
    WR1_PROG(REG_1020H, 0x000002a0U);
    WR1_PROG(REG_1010H, 0x00000008U);

    WR1_PROG(REG_1004H, 0x04040002U);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);

    WR1_PROG(REG_1014H, 0x000006b0U);
    WR1_PROG(REG_1018H, 0x00000b10U);
    WR1_PROG(REG_1020H, 0x00000ac0U);

    WR1_PROG(REG_1004H, 0x0404000aU);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);
    WR1_PROG(REG_1014H, 0x000006b0U);
    WR1_PROG(REG_1018H, 0x00000ac0U);
    WR1_PROG(REG_101CH, 0x00000070U);
    WR1_PROG(REG_1020H, 0x000002f0U);
    WR1_PROG(REG_1010H, 0x00000008U);

    WR1_PROG(REG_1004H, 0x04040002U);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);

    WR1_PROG(REG_1014H, 0x00000110U);
    WR1_PROG(REG_1018H, 0x000002a0U);
    WR1_PROG(REG_101CH, 0x00000070U);
    WR1_PROG(REG_1020H, 0x00000340U);
    WR1_PROG(REG_1010H, 0x00000008U);

    WR1_PROG(REG_1004H, 0x04040002U);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);

    WR1_PROG(REG_1014H, 0x00000340U);
    WR1_PROG(REG_1018H, 0x000002f0U);
    WR1_PROG(REG_101CH, 0x00000070U);
    WR1_PROG(REG_1020H, 0x00000390U);
    WR1_PROG(REG_1010H, 0x00000008U);

    WR1_PROG(REG_1004H, 0x04040005U);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);

    WR1_PROG(REG_1014H, 0x00000700U);
    WR1_PROG(REG_1018H, 0x00000b10U);
    WR1_PROG(REG_1020H, 0x00000ac0U);

    WR1_PROG(REG_1004H, 0x0404000aU);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);

    WR1_PROG(REG_1014H, 0x00000700U);
    WR1_PROG(REG_1018H, 0x00000ac0U);
    WR1_PROG(REG_101CH, 0x00000070U);
    WR1_PROG(REG_1020H, 0x000003e0U);
    WR1_PROG(REG_1010H, 0x00000008U);

    WR1_PROG(REG_1004H, 0x04040002U);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);

    WR1_PROG(REG_1014H, 0x00000390U);
    WR1_PROG(REG_1018H, 0x000003e0U);
    WR1_PROG(REG_101CH, 0x00000070U);
    WR1_PROG(REG_1020H, 0x00000570U);
    WR1_PROG(REG_1010H, 0x00000008U);

    WR1_PROG(REG_1004H, 0x04040006U);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);

    WR1_PROG(REG_1014H, 0x00000570U);
    WR1_PROG(REG_1018H, 0x000003e0U);
    WR1_PROG(REG_101CH, 0x00000070U);
    WR1_PROG(REG_1020H, 0x000005c0U);
    WR1_PROG(REG_1010H, 0x00000008U);

    WR1_PROG(REG_1004H, 0x04040006U);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);

    WR1_PROG(REG_1014H, 0x00000390U);
    WR1_PROG(REG_1018H, 0x000005c0U);
    WR1_PROG(REG_101CH, 0x00000070U);
    WR1_PROG(REG_1020H, 0x00000610U);
    WR1_PROG(REG_1010H, 0x00000008U);

    WR1_PROG(REG_1004H, 0x04040002U);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);

    WR1_PROG(REG_1014H, 0x00000250U);
    WR1_PROG(REG_1018H, 0x000002a0U);
    WR1_PROG(REG_101CH, 0x00000070U);
    WR1_PROG(REG_1020H, 0x000003e0U);
    WR1_PROG(REG_1010H, 0x00000008U);

    WR1_PROG(REG_1004H, 0x04040006U);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);

    WR1_PROG(REG_1014H, 0x000003e0U);
    WR1_PROG(REG_1018H, 0x000002f0U);
    WR1_PROG(REG_101CH, 0x00000070U);
    WR1_PROG(REG_1020H, 0x00000250U);
    WR1_PROG(REG_1010H, 0x00000008U);

    WR1_PROG(REG_1004H, 0x04040006U);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);

    WR1_PROG(REG_1014H, 0x00000250U);
    WR1_PROG(REG_1018H, 0x000005c0U);
    WR1_PROG(REG_101CH, 0x00000070U);
    WR1_PROG(REG_1020H, 0x00000570U);
    WR1_PROG(REG_1010H, 0x00000008U);

    WR1_PROG(REG_1004H, 0x04040002U);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);

    WR1_PROG(REG_1014H, 0x00000340U);
    WR1_PROG(REG_1018H, 0x000002f0U);
    WR1_PROG(REG_101CH, 0x00000070U);
    WR1_PROG(REG_1020H, 0x000003e0U);
    WR1_PROG(REG_1010H, 0x00000008U);

    WR1_PROG(REG_1004H, 0x04040006U);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);

    WR1_PROG(REG_1014H, 0x00000390U);
    WR1_PROG(REG_1018H, 0x000003e0U);
    WR1_PROG(REG_101CH, 0x00000070U);
    WR1_PROG(REG_1020H, 0x000005c0U);
    WR1_PROG(REG_1010H, 0x00000008U);

    WR1_PROG(REG_1004H, 0x04040002U);
    WR1_PROG(REG_1000H, 0x00010001U);
    WAIT_STS(REG_1000H, 0, 0);
}
